package org.spider.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzy
 * @since 2022-06-02 15:36:46
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("spider_config_site")
@ApiModel(value = "SpiderConfigSiteEntity对象", description = "")
public class SpiderConfigSiteEntity extends Model<SpiderConfigSiteEntity> {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("站点名称")
    @TableField("site_name")
    private String siteName;

    @ApiModelProperty("站点host")
    @TableField("site_host")
    private String siteHost;

    @ApiModelProperty("站点域名")
    @TableField("site_domain")
    private String siteDomain;

    @ApiModelProperty("关联规则id")
    @TableField("site_rule_id")
    private Long siteRuleId;

    @ApiModelProperty("站点状态，1：被关闭；2：未配置；3：已配置；4：已失效")
    @TableField("site_status")
    private Integer siteStatus;

    @ApiModelProperty("关联语言id")
    @TableField("site_language_id")
    private Long siteLanguageId;

    @ApiModelProperty("站点类型：1：app；2：web；3；小程序；4：微信公众号")
    @TableField("site_type")
    private Integer siteType;

    @ApiModelProperty("采集频率，单位：秒")
    @TableField("site_crawler_period")
    private Integer siteCrawlerPeriod;

    @ApiModelProperty("网站主页")
    @TableField("site_home")
    private String siteHome;

    @ApiModelProperty("数据来源，1：配置；2：外部导入；3：采集过程中产生")
    @TableField("data_source")
    private Integer dataSource;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("关联负责人id")
    @TableField("site_manager_id")
    private Long siteManagerId;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
